<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="common/common::common('查看用户信息')"/>
    <script>
        layui.use(['form'], function () {
            form = layui.form;
            form.render();
        });
    </script>
</head>
<body class="bg-color">
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12" style="background-color: #FFF; margin-top: 15px">
            <div class="layui-card">
                <div class="layui-card-header">基本资料</div>
                <div class="layui-card-body" pad15>

                    <form class="layui-form" style="width: 800px" id="editUserForm" th:object="${user}">
                        <div class="layui-form-body">
                            <div class="layui-form-item">
                                <label for="username" class="layui-form-label">
                                    登录账户
                                </label>
                                <div class="layui-input-block">
                                    <input type="text" id="username" name="username"  readonly="readonly"
                                           th:field="*{username}" autocomplete="off"
                                           lay-verify="required" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label for="name" class="layui-form-label">
                                    姓名
                                </label>
                                <div class="layui-input-block">
                                    <input type="text" id="name" name="name"  readonly="readonly"
                                           th:field="*{name}" autocomplete="off"
                                           lay-verify="required" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">
                                    性别
                                </label>
                                <div class="layui-input-block" th:with="dicts=${@dict.data('sys_sex')}">
                                    <input type="radio" name="sex" th:each="dict : ${dicts}"
                                           th:title="${dict.label}" disabled="disabled"
                                           th:value="${dict.value}"
                                           th:attr="checked=${dict.value eq user.sex?true:false}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">
                                    头像
                                </label>
                                <div class="layui-input-block">
                                    <div id="uploadImage">
                                        <img th:src="${user.avatar}" id="imageSrc" class="upload-block">
                                    </div>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label for="telephone" class="layui-form-label">
                                    电话号码
                                </label>
                                <div class="layui-input-block">
                                    <input type="text" id="telephone" name="telephone"
                                           th:field="*{telephone}" autocomplete="off"  readonly="readonly"
                                           onkeyup="value=value.replace(/[^\d\-\d]/g,'')" maxlength="13"
                                           lay-verify="required" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label for="email" class="layui-form-label">
                                    电子邮箱
                                </label>
                                <div class="layui-input-block">
                                    <input type="text" id="email" name="email"  readonly="readonly"
                                           th:field="*{email}" autocomplete="off"
                                           maxlength="30" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label for="address" class="layui-form-label">
                                    地址
                                </label>
                                <div class="layui-input-block">
                                    <input type="text" id="address" name="address"  readonly="readonly"
                                           th:field="*{address}" autocomplete="off"
                                           maxlength="100" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">
                                    状态
                                </label>
                                <div class="layui-input-block" th:with="dicts=${@dict.data('user_status')}">
                                    <input type="radio" name="status" th:each="dict : ${dicts}"
                                           th:title="${dict.label}" disabled="disabled"
                                           th:value="${dict.value}"
                                           th:attr="checked=${dict.value eq user.status?true:false}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label for="remarks" class="layui-form-label">
                                    描述
                                </label>
                                <div class="layui-input-block">
                                         <textarea id="remarks" maxlength="200" autocomplete="off"
                                                   th:field="*{remarks}" name="remarks"
                                                   readonly="readonly"  class="layui-textarea"></textarea>

                                </div>
                            </div>
                        </div>

<!--                        <div class="form-footer-center">-->
<!--                            <button type="button" class="button-close" onclick="goBackPreviousPage()">返回</button>-->
<!--                        </div>-->

                    </form>

                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>